package com.buba.customer.service.impl;

import com.buba.customer.dao.CustomerMapper;
import com.buba.customer.pojo.Customer;
import com.buba.customer.service.CustomerService;
import com.buba.system.pojo.Page;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@DubboService
public class CustomerServiceImpl implements CustomerService {
    private CustomerMapper customerMapper;
    @Autowired
    public void setCustomerMapper(CustomerMapper customerMapper) {
        this.customerMapper = customerMapper;
    }

    @Override
    public Integer addCustomer(Map<String, Object> map) {
        return customerMapper.addCustomer(map);
    }

    @Override
    public Long selCustomerCount() {
        return customerMapper.selCustomerCount();
    }

    @Override
    public List<Customer> selCustomer(Page page) {
        System.out.println("-------------------------------------"+page);
        return customerMapper.selCustomer(page);
    }

    @Override
    public Long selCustomerCountByName(Map<String, Object> map) {
        return customerMapper.selCustomerCountByName(map);
    }

    @Override
    public List<Customer> selCustomerByName(Map<String, Object> map) {
        return customerMapper.selCustomerByName(map);
    }

    @Override
    public Integer delCustomerAll(List<String> list) {
        return customerMapper.delCustomerAll(list);
    }

    @Override
    public Integer updCustomer(Map<String, Object> map) {
        return customerMapper.updCustomer(map);
    }

    @Override
    public List<Customer> selCustomerNo() {
        return customerMapper.selCustomerNo();
    }

    @Override
    public String selCustomerById(String customerNo) {
        return customerMapper.selCustomerById(customerNo);
    }
}
